package com.tangji.signaltower.controller;

import com.alibaba.fastjson.JSONObject;
import com.fqgj.common.api.annotations.ParamsValidate;
import com.tangji.signaltower.bean.ApiResponse;
import com.tangji.signaltower.websocket.session.SessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * User: Amarendar
 * Date: 2020/07/02
 * Time: 下午6:21
 */
@RestController
@RequestMapping("/monitor")
public class MonitorController {

    private static final Logger logger = LoggerFactory.getLogger(MonitorController.class);

    /**
     * list
     *
     * @return
     */
    @RequestMapping(value = "/online/report")
    @ParamsValidate
    public ApiResponse onlineReport(@RequestBody JSONObject request) {
        return new ApiResponse<>(SessionFactory.getSessionDataReport());
    }

}
